const https = require('https');

const options = {
  hostname: 'gmall-prod.atguigu.cn',
  path: '/mall-api/index/findBanner',
  method: 'GET',
  headers: {
    'Accept': 'application/json'
  }
};

const req = https.request(options, (res) => {
  console.log('状态码:', res.statusCode);
  console.log('响应头:', res.headers);

  let data = '';

  res.on('data', (chunk) => {
    data += chunk;
  });

  res.on('end', () => {
    console.log('响应数据:', data);
  });
});

req.on('error', (error) => {
  console.error('请求错误:', error.message);
});

req.end(); 